package cn.jaye.fabric.common.constants.exception;

import cn.jaye.fabric.common.model.BaseException;

/**
 * Created by Jaye on 2017/10/18.
 */
public enum ExceptionEnum implements BaseException {
    SYSTEM_EXCEPTION(500, "系统异常"),
    INVALID_PARAMETER(999, "无效参数"),
    USER_FAILED(1021, "获取用户失败"),
    USER_HAS_REGISTERED(1022, "user has been registered"),
    USER_HAS_NOT_REGISTERED(1023, "user has been not registered"),
    USER_PASSWORD_ERROR(1024, "用户名或密码错误"),
    USER_PASSWORD_MISS(1025, "用户名或密码missing"),
    USER_NOLOGIN(1026, "用户未登录"),
    USER_REGISTER_FAILED(1027, "用户注册失败"),
    USER_LOGIN_SUCCESSS(1028, "用户登录成功"),
    USER_LOGIN_FAILED(1029, "用户登录失败");

    private Integer code;
    private String msg;

    ExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

}
